<?php

namespace app\common\model;

/**
 * 平台账户日志
 * Class PlatMoneyLog
 * @package app\common\model
 */
class PlatMoneyLog extends Base
{
    protected $auto = array('update_time');
    protected $insert = array('create_time');

    public $types = [
        1 => '后台充值',
        2 => '提现手续费',
        3 => '支付利息',
        4 => '发放返佣',
        5 => '发奖励',
        7 => '',
        8 => '',
        9 => '',
        10 => '',

    ];


    /**
     * 取得类型名
     * @param $key
     * @param $value
     * @return mixed|string
     */
    public function getTypeNameAttr($key, $value)
    {

        return isset($this->types[$value['type']]) ? $this->types[$value['type']] : '???';
    }

}